<template>
	<view class="cu-modal drawer-modal justify-end" :class="isShow ? 'show':''" @tap="hideModal"  @touchmove.stop.prevent="()=>{return}">
		<view class="cu-dialog basis-lg" style="background-color: #fff" :style="[{height:'calc(100%)'}]" @tap.stop>
			<view class="cu-list menu text-left">
				<view class="cu-item" v-for="(item,i) in list" :key="i" @tap="jumpClick(item)">
					<view class="content">
						<text class="lg text-gray margin-right" :class="'cuIcon-' + item.icon"></text>{{item.title}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	props: {
		modalName:{
			type:String,
			default:''
		},
		title:{
			type:String,
			default:''
		}
	},
	data() {
	  return {
			
	  }
	},
	methods: {
		jumpClick(item){
			storage.get('couponsTab') ? storage.remove('couponsTab') : '';
			storage.get('jfOrderType') ? storage.remove('jfOrderType') : '';
			const{url} = item;
			if(url==='list'){
				uni.navigateTo({url:pages.order.list});
			}else if(url==='coupons'){
				uni.navigateTo({url:pages.coupons});
			}
		},
		hideModal(){
			storage.set('moreHideModal',false)
			this.$emit('hideModal',false)
		},
	},
}
</script>

<style lang="less" scoped>
	@import '@/common/style/main.css';
	.cu-dropdown {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 1110;
		opacity: 0;
		outline: 0;
		text-align: right;
		-ms-transform: scale(1.185);
		transform: scale(1.185);
		backface-visibility: hidden;
		perspective: 2000upx;
		background: rgba(0, 0, 0, 0.2);
		transition: all 0.3s ease-in-out 0s;
		pointer-events: none;

		&:before {
			content: "\200B";
			display: inline-block;
			height: 60%;
		}
		&.show {
			opacity: 1;
			transition-duration: 0.3s;
			-ms-transform: scale(1);
			transform: scale(1);
			overflow-x: hidden;
			overflow-y: auto;
			pointer-events: auto;
		}
		.cu-content {
			position: relative;
			display: inline-block;
			width: 50%;
			height:30%;
			max-height:100%;
			max-width: 100%;
			background-color: #fff;
			border-top-left-radius: 0; //设置左上角
			border-top-right-radius:0; //设置右上角
			border-bottom-left-radius: 10upx; //设置左下角
			border-bottom-right-radius: 10upx; //设置左下角
			overflow: hidden;
			text-align: left;
		}
	}
</style>
